package com.lihua.newideas.service.impl;

import com.lihua.newideas.mapper.UserManuscriptMapper;
import com.lihua.newideas.pojo.UserManuscript;
import com.lihua.newideas.service.UserManuscriptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserManuscriptServiceImpl implements UserManuscriptService {

    @Autowired
    private UserManuscriptMapper userManuscriptMapper;

    @Override
    public void insertUserManuscript(UserManuscript userManuscript) {
        userManuscriptMapper.insertUserManuscript(userManuscript);
    }

    @Override
    public UserManuscript queryManuscriptById(Long id) {
        return userManuscriptMapper.queryManuscriptById(id);
    }

    @Override
    public List<UserManuscript> queryUserManuscriptByUserName(String userName) {

        return userManuscriptMapper.queryUserManuscriptByUserName(userName);
    }

    @Override
    public List<UserManuscript> queryUserManuscriptByStatus(long manuscriptStatus) {

        return userManuscriptMapper.queryUserManuscriptByStatus(manuscriptStatus);
    }

    @Override
    public void updateManuscriptStatusById(long id, long manuscriptStatus) {
        userManuscriptMapper.updateManuscriptStatusById(id,manuscriptStatus);
    }
}
